﻿<BaseControl:DialogControl x:Class="jSLApp.Client.Forms.NewArticle"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:BaseControl="clr-namespace:jSLCore.Client.Presentation.BaseControl;assembly=jSLCore.Client.Presentation" xmlns:j="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation" xmlns:jBinding="clr-namespace:jSLCore.Client.Presentation.jBinding;assembly=jSLCore.Client.Presentation" xmlns:BaseValidationRules="clr-namespace:jSLCore.Client.Presentation.jBinding.BaseValidationRules;assembly=jSLCore.Client.Presentation" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Width="500">
    <j:ImageGroupBox Header="Создание статьи">
        <StackPanel Orientation="Vertical">
            <j:LeftHeaderContainer Header="Название:" >
                <TextBox Name="headerTxt">
                    <BaseControl:BaseControl.jBinding>
                        <jBinding:jNullContextBinding>
                            <BaseValidationRules:jNotEmptyStringRule ErrorText="Необходимо указать название"/>
                        </jBinding:jNullContextBinding>
                    </BaseControl:BaseControl.jBinding>
                </TextBox>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Описание:">
                <TextBox AcceptsReturn="True" Height="120" VerticalScrollBarVisibility="Auto" Name="briefTxt" TextWrapping="Wrap">
                    <BaseControl:BaseControl.jBinding>
                    <jBinding:jNullContextBinding>
                        <BaseValidationRules:jNotEmptyStringRule ErrorText="Необходимо указать описание статьи"/>
                    </jBinding:jNullContextBinding>
                    </BaseControl:BaseControl.jBinding>
                </TextBox>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Картинка заголовка:">
                <Image Width="120" Height="120" Stretch="Fill" Name="img" Cursor="Hand" MouseLeftButtonDown="pointImage_Clicked" HorizontalAlignment="Left"/>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Содержание:">
                <HyperlinkButton Content="Укажите архив htm" Click="pointToHTML" Name="archiveLink"/>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Тип статьи:">
                <ComboBox Name="typeCombo">
                    <BaseControl:BaseControl.jBinding>
                        <jBinding:jNullContextBinding ElementPropertyPath="SelectedItem">
                            <BaseValidationRules:jNotNullRule ErrorText="Необходимо указать тип статьи"/>
                        </jBinding:jNullContextBinding>
                    </BaseControl:BaseControl.jBinding>
                    <ComboBoxItem IsSelected="True" Content="Статья" Tag="Article"/>
                    <ComboBoxItem Content="Новость" Tag="New"/>
                </ComboBox>
            </j:LeftHeaderContainer>
        </StackPanel>
    </j:ImageGroupBox>
</BaseControl:DialogControl>
